<?php
$this->title = $model['title'];
?>
<div class="page-banner page-banner-product">
    <h1>产品</h1>
</div>
<!--/page-banner-->
<ul class="box-main page-nav">
    <li><a href="<?=Yii::$app->homeUrl?>"><?=Yii::$app->name?></a></li>
    <li><a href="<?=Yii::$app->urlManager->createUrl(['product/index', 'cid'=>$model['cate']['id']])?>"><?=$model['cate']['name']?></a></li>
    <li><span><?=$model['title']?></span></li>
</ul>
<!--/page-nav-->
<div class="box-main box-white pa-15 clearfix">
    <div class="product-detail-title"><?=$model['title']?></div>
    <!--/product-detail-title-->
    <div class="product-detail-media mb-40">
        <div class="product-detail-gallery">

            <ul class="bxslider">
                <?php $pics =  explode(',', $model->pics);?>
                <?php foreach ($pics as $pid): ?>
                <li>
                    <a href="/uploads/<?=\app\core\widgets\webuploader\Picture::getPic($pid)['path']?>" data-lightbox="detailPic">
                        <img src="/uploads/<?=\app\core\widgets\webuploader\Picture::getPic($pid)['path']?>" />
                        <i class="fa fa-search"></i>
                    </a>
                </li>
                <?php endforeach; ?>
            </ul>

            <div id="bx-pager">
                <?php foreach ($pics as $k => $pid): ?>
                <a data-slide-index="<?=$k?>" href="" class="active">
                    <img src="/uploads/<?=\app\core\widgets\webuploader\Picture::getPic($pid)['path']?>" />
                </a>
                <?php endforeach; ?>
            </div>

        </div>
        <!--/product-detail-gallery-->
        <div class="product-detail-info">
            <p>
                <?=$model['description']?>
            </p>
        </div>
        <!--/product-detail-info-->
    </div>
    <!--/product-detail-media-->
    <div class="product-detail-main">
        <div class="product-detail-sub-title">
            <h3>关于产品</h3>
        </div>
        <div class="product-detail-con">
            <?=$model['content']?>
        </div>
    </div>
    <!--/product-detail-main-->
</div>
<!--/box-main-->
<?php
$this->registerCssFile('/template/default/css/lightbox.min.css', ['depends' => \yii\web\JqueryAsset::className()]);
$this->registerJsFile('/template/default/js/lightbox.min.js', ['depends' => \yii\web\JqueryAsset::className()]);
